package com.srcptit.java.training.dungvv.btvn1;
//bai 1: kiem tra nguyen to
import java.util.Scanner;

public class Kiemtra_ngto {
	public static void main(String [] args){
		int n, i, dem = 1;
		Scanner sc = new Scanner(System.in);
		System.out.println("Moi ban nhap vao 1 so");
		n = sc.nextInt();
		if (n < 2)
			System.out.println("so "+n+" khong phai so nguyen to!");
		else if (n == 2)
			System.out.println("so "+n+" la so nguyen to!");
		else{
			for (i = 2; i < n / 2; i++)
				if (n % i == 0) dem++;
			if (dem == 1)
					System.out.println("so "+n+" la so nguyen to!");
			else
				System.out.println("so "+n+" khong phai so nguyen to!");
		}		
	}
}

	